#!/usr/bin/env python

import socket
import sys
import xmlrpclib

host = socket.gethostname()
s = xmlrpclib.ServerProxy('http://%s:40001' % host)

# Print list of available methods
try:
    print s.system.listMethods()
except:
    pass

while True:
    rq = raw_input("xrc> ")
    if rq == 'quit':
        sys.exit()
    rv = eval("s.%s" % rq)
    if hasattr(rv, "__str__"):
        print rv


